package net;

import java.io.*;
import java.util.*;

import model.*;

public class UpdatePacket implements Serializable {
	public static final long serialVersionUID = 0; // What the hell is this??
	
	private TockBoard board;
	private ArrayList<String> hand;
	private String message;
	private boolean worked;
	private TockUsers users;
	private String lastCard;
	private int deckRemaining; // Cards left in the deck
	private boolean playing;
	
	public UpdatePacket(boolean didWork) {
		worked = didWork;
	}
	
	public UpdatePacket(TockBoard board, ArrayList<String> hand, String message, TockUsers users, 
			String lastCard, int deckRemaining, boolean playing) {
		this.board = board;
		this.hand = hand;
		this.message = message;
		this.users = users;
		this.lastCard = lastCard;
		this.deckRemaining = deckRemaining;
		this.playing = playing;
		worked = true;
	}
	
	public TockBoard getBoard() {return board;}
	public ArrayList<String> getHand() {return hand;}
	public String getMessage() {return message;}
	public boolean getWorked() {return worked;}
	public TockUsers getUsers() {return users;}
	public String getLastCard() {return lastCard;}
	public int getDeckRemaining() {return deckRemaining;}
	public boolean getPlaying() {return playing;}
	
	public void used() {worked = false;}
	
	public String toString() {return "Update Packet";}
	
}
